package ${package.IApi};

import com.dtyunxi.rest.RestResponse;
import ${package.IApi}.dto.request.${entity}ReqDto;
import ${package.IApi}.dto.response.${entity}RespDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;

/**
* ${table.comment}服务接口
*
* @author ${author}
* @since ${date}
*/
@Api(tags = {"${table.comment}服务"})
@FeignClient(
    contextId = "${package.IApi?replace('.','-')}-I${entity}Api",
    name = "${cfg.feignName}",
    path = "${cfg.feignPath}",
    url = "${cfg.feignUrl}"
)
public interface I${entity}Api {

/**
* 新增${table.comment}
*
* @param addReqDto ${table.comment}请求对象
* @return 处理结果
*/
@PostMapping("")
@ApiOperation(value = "新增${table.comment}", notes = "新增${table.comment}")
RestResponse<Long> add${entity}(@RequestBody ${entity}ReqDto addReqDto);

    /**
    * 修改${table.comment}
    *
    * @param modifyReqDto ${table.comment}请求对象
    * @return 处理结果
    */
    @PutMapping("")
    @ApiOperation(value = "修改${table.comment}", notes = "修改${table.comment}")
    RestResponse<Void> modify${entity}(@RequestBody ${entity}ReqDto modifyReqDto);

    /**
    * 删除${table.comment}
    *
    * @param ids        ${table.comment}删除数据ID
    * @param instanceId 实例ID
    * @return 处理结果
    */
    @DeleteMapping("/{ids}")
    @ApiOperation(value = "删除${table.comment}", notes = "删除${table.comment}")
    RestResponse<Void> remove${entity}(@PathVariable("ids") String ids,@RequestParam("instanceId") Long instanceId);
}
